/// first_page.dart
import 'package:flutter/material.dart';
import 'package:percent_indicator/percent_indicator.dart';

import 'widgets/head_progress.dart';

class FirstPage extends StatefulWidget {
  @override
  _FirstPageState createState() => _FirstPageState();
}

class _FirstPageState extends State<FirstPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        // appBar: AppBar(title: Text('data')),
        body: Container(
      alignment: Alignment.centerLeft,
      height: 350,
      decoration: BoxDecoration(
        image: DecorationImage(
          image: AssetImage("images/mine-head-bg.png"),
          fit: BoxFit.cover,
        ),
      ),
      padding: EdgeInsets.only(left: 20, right: 20, top: 50),
      child: Container(
          height: 320,
          width: double.infinity,
          child: Column(
            children: [
              Text('生产营销综合指标'),
              Text('2020--9-20'),
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [Text('xx'), HeadProgress()],
              ),
              ListTile(
                leading: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Row(
                      children: [
                        Icon(Icons.money),
                        Text('低压采集成功率完成值'),
                      ],
                    ),
                    Text('2020.12.27')
                  ],
                ),
                trailing: SizedBox(
                  width: 80,
                  height: 40,
                  child: Column(children: [
                    Text('99.98%', style: TextStyle(color: Colors.red)),
                    LinearPercentIndicator(
                      width: 80.0,
                      lineHeight: 4.0,
                      percent: 0.5,
                      backgroundColor: Colors.grey,
                      progressColor: Colors.blue,
                    ),
                  ]),
                ),
              )
            ],
          )),
    ));
  }
}
